Custom Renaming Panel

When scanning with custom renaming, files are first filtered using the file filter. The files passed by the filter are then scanned for potential replacements. The types of replacements found are based on the python-style regular expressions (regex) or pre-defined commands chosen in the search and replace fields. You can enter any regex you like or use the 'Insert in LIst' button to choose from the pre-defined regex or command lists. The use of regex expressions along with many examples is described in the
Regular Expressions section.

The regex expressions are entered manually in a list using an editor. Press F12 or Double click with the left mouse button on a search or replace entry to activate the editor. Enter the expression and then use any of the following to save the entry:

Press ESC to exit the editor without saving.

Right clicking the mouse over the list but away from the row being edited makes other commands available for inserting, removing, enabling, disabling, or moving rows, or adding any of the pre-defined renaming commands, specialized renaming commands, or pre-defined regular expression sequences.
When adding pre-defined or specialized renaming commands, the commands are placed in the "replace pattern" column. The command sequence uses a custom syntax. The first argument is the command and the second argument is the first parameter of the command. The arguments are delimited by "*"s. When a pre-defined command in the "replace pattern" column, the "search pattern" column must remain blank or the pre-defined command becomes invalid.
Adding pre-defined regular expression sequences will insert a row or multiple rows of regular expressions to accomplish tasks like removing vowels, or removing prefixes, etc.
An exit command can also be inserted. The exit command will force the search/replace sequence to quit at that point. This can be useful when debugging a sequence of regular expressions.
A command is available for swapping the search and replace columns. This can be handy if you are creating transliteration sequences. The command menu can also be made available by pressing SHIFT-F10 after the panel is selected.

Right clicking the mouse over the row being edited makes other options available for copying/pasting/undoing/redoing entry data.

Selected rows can be moved by clicking on the down-arrow or up-arrow icons or by dragging with a mouse. Multiple rows are selected by pressing CTRL or SHIFT at the same time as pressing the left mouse button.

The search/replace scanner will serially invoke each search/replace expression pair in sequence with the output of a search/replace pair being used as input to the following search/replace pair.

Each row has a checkbox on the left-hand side. This is used to enable/disable the row. If the box is checked, then the row is enabled. If the box is blank, then the row is disabled. Disabled rows are skipped during a custom scan. This can be useful for debugging the sequence.

The table below shows an example custom renaming sequence:

Search Pattern  Replace Pattern 
%20


*Insert Counter Before*Extension*
abc
ABC

*Insert Counter Before*Prefix*

The first row deletes all occurrences of the string '%20'. The second row is a pre-defined renaming command which takes the names that have had the '%20' removed and inserts a counter before the filename extension. The third row takes the names that have just had the counters added and translates all occurrences of 'abc' with 'ABC'. The fourth row is a pre-defined renaming command which takes the resulting names and inserts a counter (the same counter as inserted by the command in row 2) before the filename prefix. It is only at this point that checks are made for potential problems such as duplicate names.

The output of the custom renaming sequence can be previewed. This is done by typing some sample text in the "Sample Name" field or dragging a file/folder icon into the field. Then press the "Update Preview" button. The custom renaming sequence will then be applied to the sample text and output to the "Preview" field. The renaming will be applied as follows:

Note that both slashes or backslashes in the sample name are treated as path delimiters.

Using the list manager panel, the rows of the custom list can be saved into a list set. You specify the name of the list and press the 'Save' button. If the name is new a new list will be stored. If the name already exists, the existing list contents will be overwritten. Use the 'Load' button to load the contents of a saved list into the displayed rows. After loading or saving, the name of the list will be highlighted to indicated that the displayed rows correspond to the named list. Once any change is made to the rows the highlighting will be removed. A 'Delete' button is available to delete any of the saved lists.

When restarting PFrank, the list entries, the preview sample text, and the three sets of lists will be restored to what they were before.

If you move the mouse between the bottom of the custom renaming panel and the top of the summary panel (see next section), you will find a sash which can be used to control the height of the summary panel.